

package View;

import Model.*;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.geom.Line2D;

public class ViewMap extends View{
    
    private JTextField testText = new JTextField(20);
    private JButton testBtn = new JButton("Test");
    private JButton reset = new JButton("Reset");
    private JButton btnCoordonate = new JButton("Coordonate");
    public JPanel content;
    private ModelMap model;

    public ViewMap(ModelMap model){
        this.model = model;

        testText.setText("mda");
        testText.setEditable(false);

        //content = new JPanel();
        JPanel content2 = new JPanel();
        //content.setPreferredSize(new Dimension(1000,70));
        content = new ViewMenu(new Dimension(1100,70));
        content2 = new ViewDraw(new Dimension(1100,600));
        //content.setLayout(new FlowLayout());
        /*content.add(new JLabel("Input"));
        content.add(testText);
        content.add(testBtn);
        content.add(reset);
        content.add(btnCoordonate);*/
        this.getContentPane().add(content,BorderLayout.PAGE_START);
        this.getContentPane().add(content2,BorderLayout.PAGE_END);
        this.pack();

        this.setTitle("Calculare ruta metrou");
    }
    public void reset(){
        testText.setText("reset");
    }
    
    public void addBtnListener(ActionListener mal) {
        testBtn.addActionListener(mal);
    }
    public void addResetListener(ActionListener mal) {
        reset.addActionListener(mal);
    }
    public void addCoordListener(ActionListener mal) {
        btnCoordonate.addActionListener(mal);
    }
}
